package com.example.account.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "account_tbl")
public class Account {

    // 这里的属性值和下面java属性的字段名对应
    public static final String FILED_ID = "id";
    public static final String FILED_USER_ID = "userId";
    public static final String FILED_MONEY = "money";

    @Id
    @KeySql(useGeneratedKeys = true)
    private Integer id;

    @Column(name = "user_id")
    private String userId;

    @Column(name = "money")
    private Integer money;
}
